home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Online / PHP / include / php / ext / standard / php_math.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-26  |  3.4 KB  |  129 lines

  1. /* 
  2.    +----------------------------------------------------------------------+
  3.    | PHP version 4.0                                                      |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997-2001 The PHP Group                                |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 2.02 of the PHP license,      |
  8.    | that is bundled with this package in the file LICENSE, and is        |
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.php.net/license/2_02.txt.                                 |
  11.    | If you did not receive a copy of the PHP license and are unable to   |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@php.net so we can mail you a copy immediately.               |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Jim Winstead (jimw@php.net)                                 |
  16.    |          Stig Sæther Bakken <ssb@guardian.no>                        |
  17.    +----------------------------------------------------------------------+
  18. */
  19.  
  20. /* $Id: php_math.h,v 1.6 2001/02/26 06:07:23 andi Exp $ */
  21.  
  22. #ifndef PHP_MATH_H
  23. #define PHP_MATH_H
  24. PHP_FUNCTION(sin);
  25. PHP_FUNCTION(cos);
  26. PHP_FUNCTION(tan);
  27. PHP_FUNCTION(asin);
  28. PHP_FUNCTION(acos);
  29. PHP_FUNCTION(atan);
  30. PHP_FUNCTION(atan2);
  31. PHP_FUNCTION(pi);
  32. PHP_FUNCTION(exp);
  33. PHP_FUNCTION(log);
  34. PHP_FUNCTION(log10);
  35. PHP_FUNCTION(pow);
  36. PHP_FUNCTION(sqrt);
  37. PHP_FUNCTION(srand);
  38. PHP_FUNCTION(rand);
  39. PHP_FUNCTION(getrandmax);
  40. PHP_FUNCTION(mt_srand);
  41. PHP_FUNCTION(mt_rand);
  42. PHP_FUNCTION(mt_getrandmax);
  43. PHP_FUNCTION(abs);
  44. PHP_FUNCTION(ceil);
  45. PHP_FUNCTION(floor);
  46. PHP_FUNCTION(round);
  47. PHP_FUNCTION(decbin);
  48. PHP_FUNCTION(dechex);
  49. PHP_FUNCTION(decoct);
  50. PHP_FUNCTION(bindec);
  51. PHP_FUNCTION(hexdec);
  52. PHP_FUNCTION(octdec);
  53. PHP_FUNCTION(base_convert);
  54. PHP_FUNCTION(number_format);
  55. PHP_FUNCTION(deg2rad);
  56. PHP_FUNCTION(rad2deg);
  57.  
  58. #include <math.h>
  59.  
  60. #ifndef M_E
  61. #define M_E            2.7182818284590452354   /* e */
  62. #endif
  63.  
  64. #ifndef M_LOG2E
  65. #define M_LOG2E        1.4426950408889634074   /* log_2 e */
  66. #endif
  67.  
  68. #ifndef M_LOG10E
  69. #define M_LOG10E       0.43429448190325182765  /* log_10 e */
  70. #endif
  71.  
  72. #ifndef M_LN2
  73. #define M_LN2          0.69314718055994530942  /* log_e 2 */
  74. #endif
  75.  
  76. #ifndef M_LN10
  77. #define M_LN10         2.30258509299404568402  /* log_e 10 */
  78. #endif
  79.  
  80. #ifndef M_PI
  81. #define M_PI           3.14159265358979323846  /* pi */
  82. #endif
  83.  
  84. #ifndef M_PI_2
  85. #define M_PI_2         1.57079632679489661923  /* pi/2 */
  86. #endif
  87.  
  88. #ifndef M_PI_4
  89. #define M_PI_4         0.78539816339744830962  /* pi/4 */
  90. #endif
  91.  
  92. #ifndef M_1_PI
  93. #define M_1_PI         0.31830988618379067154  /* 1/pi */
  94. #endif
  95.  
  96. #ifndef M_2_PI
  97. #define M_2_PI         0.63661977236758134308  /* 2/pi */
  98. #endif
  99.  
  100. #ifndef M_SQRTPI
  101. #define M_SQRTPI       1.77245385090551602729  /* sqrt(pi) */
  102. #endif
  103.  
  104. #ifndef M_2_SQRTPI
  105. #define M_2_SQRTPI     1.12837916709551257390  /* 2/sqrt(pi) */
  106. #endif
  107.  
  108. #ifndef M_LNPI
  109. #define M_LNPI         1.14472988584940017414  /* ln(pi) */
  110. #endif
  111.  
  112. #ifndef M_EULER
  113. #define M_EULER        0.57721566490153286061 /* Euler constant */
  114. #endif
  115.  
  116. #ifndef M_SQRT2
  117. #define M_SQRT2        1.41421356237309504880  /* sqrt(2) */
  118. #endif
  119.  
  120. #ifndef M_SQRT1_2
  121. #define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
  122. #endif
  123.  
  124. #ifndef M_SQRT3
  125. #define M_SQRT3           1.73205080756887729352  /* sqrt(3) */
  126. #endif
  127.  
  128. #endif /* PHP_MATH_H */
  129.